// 1、导入vue-router
import {createRouter, createWebHashHistory} from "vue-router";
//2、路由表
const routes = [
    {
        path: '/',
        redirect: 'theMenu',
        children: [
            {
                path: '/theMenu',
                name: 'theMenu',
                component: () => import('@/views/theMenu.vue'),
            },
            {
                path: '/myToDo',
                name: 'myToDo',
                component: () => import('@/views/myToDo.vue'),
            },
        ],

    },

]
//3、创建路由实例。
const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

//4、默认导出
export default router